home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 14
/
Hot Mix 14.iso
/
HTML
/
vendors
/
heeg
/
RemoveIt2
< prev
next >
Wrap
Text File
|
1996-07-16
|
2KB
|
72 lines
#!/bin/csh -f
set INST_DIR=heeg
if ( -r /usr/tmp/HOTMIXPATH_$INST_DIR ) then
source /usr/tmp/HOTMIXPATH_$INST_DIR
else if ( -r /tmp/HOTMIXPATH_$INST_DIR ) then
source /tmp/HOTMIXPATH_$INST_DIR
else if ( -r ~/HOTMIXPATH_$INST_DIR ) then
source ~/HOTMIXPATH_$INST_DIR
else
LOOP1:
echo " "
echo "Enter the name of the directory where VisualWorks "
echo "is installed ( q to quit ) : \c"
set INST_PATH = $<
if ($#INST_PATH == 0 ) then
echo " "
echo "Input Error. Please try again."
goto LOOP1
else if ( $INST_PATH == 'q' ) then
echo " "
echo ... Bye"
sleep 3
exit
endif
if ( ! -d $INST_PATH ) then
echo " "
echo "Can't find the $INST_PATH directory."
echo " "
echo "Press Enter to quit, and then try again. \c"
set a = $<
\rm -f /usr/tmp/HOTMIXPATH_$INST_DIR > /dev/null
\rm -f /tmp/HOTMIXPATH_$INST_DIR > /dev/null
\rm -f ~/HOTMIXPATH_$INST_DIR > /dev/null
exit -1
endif
endif
echo " "
echo "About to remove the entire $INST_PATH directory."
LOOP2:
echo " "
echo "Continue (y/n)? \c"
set a = $<
if ( $a == 'n' ) then
exit -1
else if ( $a == 'y' ) then
else
goto LOOP2
endif
if ( -w $INST_PATH ) then
\rm -rf $INST_PATH
else
echo " "
echo "You have no permission to remove the $INST_PATH directory"
echo " "
su - root -c "/bin/rm -rf $INST_PATH"
endif
\rm -f /usr/tmp/HOTMIXPATH_$INST_DIR > /dev/null
\rm -f /tmp/HOTMIXPATH_$INST_DIR > /dev/null
\rm -f ~/HOTMIXPATH_$INST_DIR > /dev/null
echo " "
echo "Removal Complete\!"
echo " "
echo "Press Enter to exit this window... \c"
set a = $<